package com.wx.feign;

import com.wx.common.util.CommRest;
import com.wx.common.util.Rest;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

/**
 * @program: xj-shop
 * @description: 服务调用
 * @author: 徐健
 * @create: 2022-09-01 10:29
 **/
@FeignClient("shop-admin")
public interface TestClient {

    @PostMapping(value = "test")
    public Rest test(@RequestBody Integer id);
}
class TestClientFallback implements TestClient{

    @Override
    public Rest test(Integer id) {
        return CommRest.error();
    }
}